home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 1.iso / HENSA / MATHS / PLPLOT / PLPLOT.ZIP / include / metadefs.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-11-15  |  2.4 KB  |  92 lines

  1. /* $Id: metadefs.h,v 1.9 1993/11/15 08:31:37 mjl Exp $
  2.  * $Log: metadefs.h,v $
  3.  * Revision 1.9  1993/11/15  08:31:37  mjl
  4.  * Bumped metafile version number since now write pages info to header.
  5.  *
  6.  * Revision 1.8  1993/08/09  22:16:39  mjl
  7.  * Miscellaneous cleaning up.
  8.  *
  9.  * Revision 1.7  1993/07/31  08:08:40  mjl
  10.  * Added macro CHANGE_STATE for new state driver function.
  11.  *
  12.  * Revision 1.6  1993/07/02  07:21:12  mjl
  13.  * Added header definitions for use by TK driver.  Also new macros for plplot
  14.  * bop/eop commands.
  15. */
  16.  
  17. /*
  18.     metadefs.h
  19.     Geoffrey Furnish
  20.     5 May 1991
  21.     
  22.     This file contains definitions of constants and structures which
  23.     are needed by the PLPLOT metafile writer and renderer.
  24. */
  25.  
  26. /*
  27. * PLMETA_HEADER holds the magic string at head of metafile.
  28. * PLMETA_VERSION holds the version number (year & letter).
  29. * Note: All strings written into the file header are limited to a maximum
  30. * of 80 characters.
  31. */
  32.  
  33. #define PLMETA_HEADER    "PLPLOT"
  34. #define PLMETA_VERSION    "1993c"
  35.  
  36. /* These are used by the TK driver client/server code */
  37.  
  38. #define PLSERV_HEADER    "PLPLOT"
  39. #define PLSERV_VERSION    "1993b"
  40.  
  41. /* Symbolic constants for old metafile versions (prior to 1992a).
  42.    Now these are stored in the metafile header. */
  43.  
  44. #define PLMETA_X_OLD    10000
  45. #define PLMETA_Y_OLD    10000
  46.  
  47. /* These numbers are supposed to be in dots/mm.  Since I am using a very
  48.    large virtual display space, these need to be pretty big. */
  49.  
  50. #define PIXEL_RES_X_OLD        42
  51. #define PIXEL_RES_Y_OLD        56
  52.  
  53. /* Macros to make it easier to abort on nonzero return code */
  54. /* Can't call plexit on a write failure since that would be circular */
  55.  
  56. #define plm_wr(code) \
  57.     if (code) { fprintf(stderr, "Unable to write to MetaFile\n"); exit(1); }
  58.  
  59. #define plm_rd(code) \
  60.     if (code) plexit( "Unable to read from MetaFile" )
  61.  
  62. /*
  63.    The available commands are as follows.
  64.  
  65.    *** NOTICE !!! ***
  66.    If you change ANY of the following, you will wreck backward
  67.    backward compatibility with old metafiles.  You may add, but do
  68.    NOT delete !!!
  69. */
  70.  
  71. #define INITIALIZE    1
  72. #define CLOSE        2
  73. #define SWITCH_TO_TEXT    3
  74. #define SWITCH_TO_GRAPH    4
  75. #define EOP        5
  76. #define CLEAR        5    /* deprecated */
  77. #define BOP        6
  78. #define PAGE        6    /* deprecated */
  79. #define NEW_COLOR    7
  80. #define NEW_WIDTH    8
  81. #define LINE        9
  82. #define LINETO        10
  83. #define ESCAPE        11
  84. #define ADVANCE        12
  85. #define POLYLINE    13
  86. #define NEW_COLOR0     NEW_COLOR
  87. #define NEW_COLOR1    14
  88. #define CHANGE_STATE    15
  89.  
  90. #define END_OF_FIELD 255
  91.